package com.ethink.order.facadeImpl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.TobSaleSettlementOrderFacade;
import com.ethink.order.api.info.TobSaleSettlementOrderInfo;
import com.ethink.order.api.request.TobSaleSettlementOrderAddRequest;
import com.ethink.order.api.request.TobSaleSettlementOrderUpdateRequest;
import com.ethink.order.api.request.TobSaleSettlementPageQueryRequest;
import com.ethink.order.api.response.TobSaleSettlementQueryDetailResponse;
import com.ethink.order.service.TobSaleSettlementOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author default
 * @version 1.0.0
 * @ClassName TobSaleSettlementOrderFacadeImpl.java
 * @Description
 * @createTime 2022年11月17日 15:35:00
 */
@RestController
@RequestMapping("order-service/facade/v1/tobSaleSettlementOrder")
public class TobSaleSettlementOrderFacadeImpl implements TobSaleSettlementOrderFacade {

    @Autowired
    private TobSaleSettlementOrderService tobSaleSettlementOrderService;

    @Override
    public void addTobSaleSettleOrder(TobSaleSettlementOrderAddRequest request) {
        tobSaleSettlementOrderService.add(request);
    }

    @Override
    public Integer delete(Long id) {
        return tobSaleSettlementOrderService.delete(id);
    }

    @Override
    public Integer update(TobSaleSettlementOrderUpdateRequest updateRequest) {
        return tobSaleSettlementOrderService.update(updateRequest);
    }

    @Override
    public Page<TobSaleSettlementOrderInfo> pageQuery(TobSaleSettlementPageQueryRequest request) {
        return tobSaleSettlementOrderService.pageQuery(request);
    }

    @Override
    public TobSaleSettlementQueryDetailResponse queryDetail(Long id) {
        return tobSaleSettlementOrderService.queryDetail(id);
    }

    @Override
    public Integer matchConfirm(Long id) {
        return tobSaleSettlementOrderService.matchConfirm(id);
    }
}
